import request from '@/utils/request'

// 查询投票选项列表
export function listVoteOption(query) {
  return request({
    url: '/business/voteOption/list',
    method: 'get',
    params: query
  })
}
// 查询投票选项列表
export function listVoteOptionWithVoteTitle(query) {
  return request({
    url: '/business/voteOption/listWithTitle',
    method: 'get',
    params: query
  })
}
// 查询投票选项详细
export function getVoteOption(optionId) {
  return request({
    url: '/business/voteOption/' + optionId,
    method: 'get'
  })
}

// 新增投票选项
export function addVoteOption(data) {
  return request({
    url: '/business/voteOption',
    method: 'post',
    data: data
  })
}

// 修改投票选项
export function updateVoteOption(data) {
  return request({
    url: '/business/voteOption',
    method: 'put',
    data: data
  })
}

// 删除投票选项
export function delVoteOption(optionId) {
  return request({
    url: '/business/voteOption/' + optionId,
    method: 'delete'
  })
}
